package com.anpy.bill.controller;

import com.anpy.bill.model.result.AppResult;
import com.anpy.bill.service.AppService;
import com.anpy.common.service.model.result.ApiResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author : anpy
 * @create 2023/10/26 15:29
 */
@RestController
@RequestMapping("/app")
@ResponseBody
public class AppController {

    @Resource
    private AppService appService;

    @GetMapping("/data")
    public ApiResult<AppResult> homeData(Long userId) {
        AppResult appResult = appService.homeData(userId);
        return ApiResult.success(appResult);
    }

}
